package com.tomehay.termprojectmanage_server.controller;


import com.tomehay.termprojectmanage_server.pojo.Model.Course;
import com.tomehay.termprojectmanage_server.pojo.Model.Department;
import com.tomehay.termprojectmanage_server.pojo.VO.ResultVO;
import com.tomehay.termprojectmanage_server.service.DepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author tomehay
 * @since 2023-06-20
 */
@RestController
@RequestMapping("api/department")
public class DepartmentController {
    @Autowired
    DepartmentService departmentService;

    @RequestMapping("/GetAllDepartments")
    public ResultVO<List<Department>> GetAllDepartments(){
        return departmentService.GetAllDepartments();
    }
}
